{% extends "books/base_books.html" %}


{% block title %}{{ object.full_title }}{% endblock %}


{% block content %}
  {% load markup %}
  
  <h2 class="page_title">{{ object.full_title }}
    {% if object.subtitle %}<em class="sub_title">{{ object.subtitle }}</em>{% endif %}</h2>
  
  {% if object.cover %}
  <a class="cover" href="{{ object.amazon_url }}"><img src="{{ object.cover_url }}" alt="Book cover"></a>
  {% else %}
  <div class="no_cover"></div>
  {% endif %}
  
  <ul class="details">
    <li>Author{{ object.authors.all|pluralize }}: {% for author in object.authors.all %}<a href="{{ author.get_absolute_url }}">{{ author.full_name }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</li>
    <li>Publisher: <a href="{{ object.publisher.get_absolute_url }}">{{ object.publisher.full_title }}</a></li>
    <li>Released: {{ object.published|date:"d F Y" }}</li>
    <li>Pages: {{ object.pages }} {% if not object.has_read %}on page {{ object.bookmark }}{% endif %}</li>
    <li>Genre: {% for genre in object.genre.all %}{{ genre.title }}{% if not forloop.last %}, {% endif %}{% endfor %}</li>
    <li>ISBN: {{ object.isbn }} (<a href="{{ object.amazon_url }}">Amazon</a>)</li>
  </ul>
  
  {% if object.review %}
  <div class="review">
    <h3>Review</h3>
    {{ object.review|markdown }}
  </div>
  {% endif %}
  
  {% for highlight in object.highlight_set.all %}
  <blockquote class="quote">
    {{ highlight.highlight|markdown }}
    {% if highlight.page %}<p class="source">&mdash; p. {{ highlight.page }}<p>{% endif %}
  </blockquote>
  {% endfor %}
{% endblock %}